package com.aboverock.autoconfigure.properties;

import java.util.LinkedHashMap;
import java.util.Map;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * The Class ShiroProperties.
 *
 * @author Rock Wang
 */
@ConfigurationProperties("kbsmart.shiro")
public class ShiroProperties {

    /** shiro ehcache配置文件路径. */
    private String ehcacheConfig = "classpath:ehcache-shiro.xml";

    /** The authorization cache name. */
    private String cacheAuthorization = "authorizationCache";

    /** The authentication cache name. */
    private String cacheAuthentication = "jwtCache";
    
    private Map<String, String> filterUrl = new LinkedHashMap<String, String>();

    /** The redis host(ip:port), eg: 127.0.0.1:6379. */
    private String redisHost;

    /** The redis password. */
    private String redisPassword;

    /** The Redis key prefix for caches. */
    private String redisPrefix;

    /** The redis expire: 12 hours. */
    private int redisExpire = 12 * 60 * 60;

    public String getEhcacheConfig() {
        return ehcacheConfig;
    }

    public void setEhcacheConfig(String ehcacheConfig) {
        this.ehcacheConfig = ehcacheConfig;
    }

    public String getCacheAuthorization() {
        return cacheAuthorization;
    }

    public void setCacheAuthorization(String cacheAuthorization) {
        this.cacheAuthorization = cacheAuthorization;
    }

    public String getCacheAuthentication() {
        return cacheAuthentication;
    }

    public void setCacheAuthentication(String cacheAuthentication) {
        this.cacheAuthentication = cacheAuthentication;
    }

    public Map<String, String> getFilterUrl() {
        return filterUrl;
    }

    public void setFilterUrl(Map<String, String> filterUrl) {
        this.filterUrl = filterUrl;
    }

    public String getRedisHost() {
        return redisHost;
    }

    public void setRedisHost(String redisHost) {
        this.redisHost = redisHost;
    }

    public String getRedisPassword() {
        return redisPassword;
    }

    public void setRedisPassword(String redisPassword) {
        this.redisPassword = redisPassword;
    }

    public String getRedisPrefix() {
        return redisPrefix;
    }

    public void setRedisPrefix(String redisPrefix) {
        this.redisPrefix = redisPrefix;
    }

    public int getRedisExpire() {
        return redisExpire;
    }

    public void setRedisExpire(int redisExpire) {
        this.redisExpire = redisExpire;
    }

}
